// 文字省略
.text-ellipsis-1,
.text-ellipsis-2,
.text-ellipsis-3 {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal !important;
  text-overflow: ellipsis;
  word-wrap: break-word;
  word-break: break-all;
  -webkit-box-orient: vertical;
}

.text-ellipsis-1 {
  -webkit-line-clamp: 1;
}

.text-ellipsis-2 {
  -webkit-line-clamp: 2;
}

.text-ellipsis-3 {
  -webkit-line-clamp: 2;
}

.table-cell-empty {
  .el-table__cell {
    .cell:empty::before {
      content: "-";
    }
  }
}

// 设置 el-tooltip 最大宽度300
.el-tooltip__popper.is-dark {
  max-width: 300px;
}

// Tooltip
.el-tooltip__popper {
  &.is-dark {
    background: rgb(0 0 0 / 75%);

    div {
      // word-break: break-word;
      word-break: break-all;
    }
  }
}

// 重写 el-tabs 样式
.common-custom-pane-tabs.el-tabs {
  .el-tabs__header {
    position: inherit;
    box-shadow: inherit;

    .el-tabs__nav {
      display: flex;
      align-items: center;
      width: 100%;
    }

    .el-tabs__nav-scroll,
    .el-tabs__nav {
      height: auto;
      margin-bottom: 10px;
      line-height: 36px;
    }

    .el-tabs__nav-scroll {
      display: flex;
      flex-wrap: wrap;
      padding-left: 0;
    }
  }

  .el-tabs__content {
    display: block;
  }

  .el-tabs__nav-wrap::after {
    content: none;
  }

  .el-tabs__nav-wrap {
    .el-tabs__nav {
      .el-tabs__active-bar {
        display: none;
      }

      .el-tabs__item {
        flex: 1;
        box-sizing: border-box;
        height: 36px;
        padding: 0;
        color: var(--theme-color-text-secondary);
        font-size: 14px;
        line-height: 36px;
        text-align: center;
        background: #f9f9ff;
        border: 1px solid #f9f9ff;
        border-radius: 4px;

        &.is-active {
          box-sizing: border-box;
          color: var(--theme-color-1);
          background: rgb(68 81 233 / 16%);
          border: 1px solid rgb(68 81 233 / 16%);
        }
      }
    }
  }
}

// el-cascader 样式
.common-el-cascader {
  .el-cascader-panel {
    height: 300px !important;
    overflow: auto;
  }
}

// 文字disabled 样式
.text-disabled {
  &.el-form-item {
    .el-form-item__label {
      color: #d4d8e7;
    }

    .el-input.is-disabled .el-input__inner {
      color: #d4d8e7;
      background-color: transparent;
    }
  }
}

.drawer-scrollbar-hide {
  .el-drawer__body,
  & {
    scrollbar-width: none; /* 火狐 */
    ::-webkit-scrollbar {
      display: none; /* Chrome Safari */
    }

    &::-webkit-scrollbar {
      display: none; /* Chrome Safari */
    }
  }
}

// 隐藏滚动条
.scrollbar-hide,
.x6-graph-scroller {
  scrollbar-width: none; /* 火狐 */
  ::-webkit-scrollbar {
    display: none; /* Chrome Safari */
  }

  &::-webkit-scrollbar {
    display: none; /* Chrome Safari */
  }
}

// 隐藏全局纵向滚动条

// 公共滚动条
.common-scrollbar {
  overflow-y: auto;
  scrollbar-width: thin; /* 火狐浏览器滚动条 设置为细 */
  &::-webkit-scrollbar {
    width: 6px; // 横向滚动条
    height: 6px; // 纵向滚动条
    // display: none; /* Chrome Safari */
  }

  // 滚动条的滑块
  &::-webkit-scrollbar-thumb {
    background-color: #bcbeca;
    border-radius: 13px;
  }
}

// 公共抽屉样式
.common-right-drawer {
  .el-drawer {
    width: auto !important;
    min-width: 200px;

    .el-drawer__header {
      margin-bottom: 24px;
      padding: 15px 24px;
      color: var(--theme-color-text-primary);
      font-size: 16px;
      border-bottom: 1px solid #edeef2 !important;
    }

    .el-drawer__body {
      padding: 0 24px 24px;

      &::-webkit-scrollbar {
        width: 0 !important;
      }
    }
  }
}

.common-font {
  textarea {
    font-weight: 400;
    font-size: 13px;
    font-style: normal;
  }
}

// 公共表单样式
.com-draw-form {
  box-sizing: border-box;
  height: 100%;

  ::v-deep .el-input--small .el-input__inner {
    min-height: 36px;
    line-height: 36px;
  }

  ::v-deep textarea {
    // height: 107px;
    box-sizing: border-box;
    font-family: normal;
  }

  .el-form-item__label {
    position: relative;
  }

  ::v-deep .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before,
  .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::before {
    content: none;
  }

  ::v-deep .el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::after,
  .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap > .el-form-item__label::after {
    color: #f56c6c;
    content: "*";
  }
}

.c-p {
  cursor: pointer;
}

// 用于表单对齐
.el-form-label-36 {
  .el-form-item__label {
    line-height: 36px !important;
  }
}

// 表格样式 2022-11-25
.page-table-cont {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  .el-table::before {
    height: 0;
  }

  .table-wrap {
    position: relative;
    flex: 1;

    .el-table {
      height: 100%;
      width: 100%;
      position: absolute;
    }
  }

  .el-table--scrollable-y .el-table__body-wrapper {
    overflow-y: auto;
  }
}

// 滚动条样式
.common-scrollbar {
  overflow-y: overlay !important;
  scrollbar-width: thin !important; /* 火狐浏览器滚动条 设置为细 */
  &::-webkit-scrollbar {
    width: 6px !important; // 横向滚动条
    height: 6px !important; // 纵向滚动条
    // display: none; /* Chrome Safari */
  }

  // 滚动条的滑块
  &::-webkit-scrollbar-thumb {
    background-color: transparent !important;
    border-radius: 13px !important;
  }

  &:hover {
    &::-webkit-scrollbar-thumb {
      background-color: rgba(144, 147, 153, 0.3) !important;

      &:hover {
        background-color: rgba(144, 147, 153, 0.45) !important;
      }
    }
  }
}

.i-require {
  &::before {
    content: "*";
    color: var(--theme-color-error);
  }
}

.i-label-highlight {
  position: relative;
  padding-left: 10px;
  &::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 0;
    width: 4px;
    bottom: 2px;
    background: var(--theme-color-1);
    border-radius: 4px;
  }
}

// page-container 列表容器
.page-container {
  height: 100%;

  > .left,
  > .right {
    box-sizing: border-box;
    padding: 16px 14px;
    background-color: #fff;
    border-radius: var(--theme-border-radius);
  }

  > .left {
    position: relative;
    width: 266px;
    height: 100%;
  }

  > .right {
    margin-left: 14px;
    width: calc(100% - 266px - 14px);
    overflow-y: auto;
  }
}
::v-deep {
  .icon-copy {
    color: var(--theme-color-primary);
  }
}

.icon-params-round {
  display: inline-block;
  border-radius: 3px;
  width: 6px;
  height: 6px;
  margin-right: 8px;

  &.icon-params-round__default {
    background: #57b987;
  }
  &.icon-params-round__system {
    background: linear-gradient(0deg, #206ccf, #206ccf), #57b987;
  }
  &.icon-params-round__custom {
    background: linear-gradient(0deg, #fc7e00, #fc7e00), #57b987;
  }
  &.icon-params-round__dataset {
    background: linear-gradient(0deg, #ffc700, #ffc700), #57b987;
  }
}
